package com.huidu.bitrade.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.SneakyThrows;
import org.apache.skywalking.apm.toolkit.trace.ActiveSpan;

/**
 *
 */
public class MQTraceAspect {

    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();

    @SneakyThrows
    public static void consumerData(String topic,Object data){
        ActiveSpan.tag("mq.topic",topic);
    }

    @SneakyThrows
    public static void consumerData(String topic,Object data,String desc){
        consumerData(topic, data);
        ActiveSpan.tag("mq.desc",desc);
    }
}
